import request from "@/utils/request";

// 查询物资调拨列表
export function listMaterialAllocate(query) {
  return request({
    url: "/cld/materialAllocate/list",
    method: "get",
    params: query,
  });
}

// 查询领用记录列表
export function listMaterialApply(query) {
  return request({
    url: "/cld/materialAllocate/getUseList",
    method: "get",
    params: query,
  });
}

// 查询物资调拨详细
export function getMaterialAllocate(materialAllocateId) {
  return request({
    url: "/cld/materialAllocate/" + materialAllocateId,
    method: "get",
  });
}

// 新增物资调拨
export function addMaterialAllocate(data) {
  return request({
    url: "/cld/materialAllocate",
    method: "post",
    data: data,
  });
}

// 修改物资调拨
export function updateMaterialAllocate(data) {
  return request({
    url: "/cld/materialAllocate",
    method: "put",
    data: data,
  });
}

// 删除物资调拨
export function delMaterialAllocate(materialAllocateId) {
  return request({
    url: "/cld/materialAllocate/" + materialAllocateId,
    method: "delete",
  });
}

// 审核调拨
export function auditCldMaterialAllocate(data) {
  return request({
    url: "/cld/materialAllocate/audit",
    method: "put",
    data: data,
  });
}
